package com.tjsinfo.tjsoa.useseal.bo;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;

import com.tjsinfo.tjsoa.Dao.IQbcDao;
import com.tjsinfo.tjsoa.useseal.dao.ITUseSealSealOpeDAO;
import com.tjsinfo.tjsoa.useseal.vo.TUseSealSealOpe;

public class TUseSealSealOpeBO implements ITUseSealSealOpeBO {
	private IQbcDao qbcDao;
	private ITUseSealSealOpeDAO sealOpeDao;

	public void setQbcDao(IQbcDao qbcDao) {
		this.qbcDao = qbcDao;
	}
	public void setSealOpeDao(ITUseSealSealOpeDAO sealOpeDao) {
		this.sealOpeDao = sealOpeDao;
	}


	public void save(TUseSealSealOpe transientInstance) {
		// TODO Auto-generated method stub
		sealOpeDao.save(transientInstance);
	}

	public List<TUseSealSealOpe> selectSealId(String sealId) {
		// TODO Auto-generated method stub
		DetachedCriteria detachedCriteria = DetachedCriteria.forClass(TUseSealSealOpe.class);
		detachedCriteria.add(Restrictions.eq("sealId", sealId));
		detachedCriteria.addOrder(Order.desc("dateTime"));
		return qbcDao.getCriteria(detachedCriteria);
	}
	public void deleteA(String sealId) {
		// TODO Auto-generated method stub
		sealOpeDao.deleteA(sealId);
	}		
	
}
